/* Opening Animations */
.anop-fadein {
    animation: fadein 1s ease-in forwards;
}

.anop-slideup {
    animation: slideup 1s ease-out forwards;
}

.anop-slidedown {
    animation: slidedown 1s ease-out forwards;
}

.anop-slideleft {
    animation: slideleft 1s ease-out forwards;
}

.anop-slideright {
    animation: slideright 1s ease-out forwards;
}

.anop-popup {
    animation: popup 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.anop-spin {
    animation: spin 1s ease-out forwards;
}

.anop-zoomin {
    animation: zoomin 1s ease-out forwards;
}

.anop-zoomout {
    animation: zoomout 1s ease-out forwards;
}

.anop-flipx {
    animation: flipx 1s ease-out forwards;
}

.anop-flipy {
    animation: flipy 1s ease-out forwards;
}

.anop-swing {
    animation: swing 1s ease-out forwards;
}

.anop-wobble {
    animation: wobble 1s ease-out forwards;
}

.anop-rollout {
    animation: rollout 1s ease-out forwards;
}

.anop-rollin {
    animation: rollin 1s ease-out forwards;
}

.anop-rotate {
    animation: rotate 1s ease-out forwards;
}

.anop-spiral {
    animation: spiral 1s ease-out forwards;
}

.anop-elastic {
    animation: elastic 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Idle Animations */
.anid-spinning {
    animation: spin 2s linear infinite;
}

.anid-shaking {
    animation: shake 0.5s ease-in-out infinite;
}

.anid-floating {
    animation: float 3s ease-in-out infinite;
}

.anid-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.anid-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.anid-glow {
    animation: glow 2s ease-in-out infinite;
}

.anid-vibrate {
    animation: vibrate 0.3s linear infinite;
}

.anid-swing {
    animation: swing 2s ease-in-out infinite;
}

.anid-wobble {
    animation: wobble 2s ease-in-out infinite;
}

.anid-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.anid-flash {
    animation: flash 2s ease-in-out infinite;
}

.anid-jello {
    animation: jello 2s ease-in-out infinite;
}

.anid-hinge {
    animation: hinge 2s ease-in-out infinite;
}

.anid-flip {
    animation: flip 2s ease-in-out infinite;
}

/* Keyframes */
@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideup {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slidedown {
    from { transform: translateY(-100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideleft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideright {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes popup {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes zoomin {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes zoomout {
    from { transform: scale(1.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes flipx {
    from { transform: rotateX(90deg); opacity: 0; }
    to { transform: rotateX(0deg); opacity: 1; }
}

@keyframes flipy {
    from { transform: rotateY(90deg); opacity: 0; }
    to { transform: rotateY(0deg); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0%, 100% { filter: brightness(100%); }
    50% { filter: brightness(150%); }
}

@keyframes vibrate {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

@keyframes wobble {
    0%, 100% { transform: translateX(0%); }
    15% { transform: translateX(-25%) rotate(-5deg); }
    30% { transform: translateX(20%) rotate(3deg); }
    45% { transform: translateX(-15%) rotate(-3deg); }
    60% { transform: translateX(10%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.2); }
    20%, 40% { transform: scale(0.9); }
}

@keyframes flash {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

@keyframes jello {
    0%, 100% { transform: scale3d(1, 1, 1); }
    30% { transform: scale3d(1.25, 0.75, 1); }
    40% { transform: scale3d(0.75, 1.25, 1); }
    50% { transform: scale3d(1.15, 0.85, 1); }
    65% { transform: scale3d(0.95, 1.05, 1); }
    75% { transform: scale3d(1.05, 0.95, 1); }
}

@keyframes hinge {
    0% { transform: rotate(0); transform-origin: top left; }
    20%, 60% { transform: rotate(80deg); transform-origin: top left; }
    40%, 80% { transform: rotate(60deg); transform-origin: top left; }
    100% { transform: rotate(0); transform-origin: top left; }
}

@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

@keyframes rollout {
    from { transform: translateX(0) rotate(0); opacity: 1; }
    to { transform: translateX(100%) rotate(540deg); opacity: 0; }
}

@keyframes rollin {
    from { transform: translateX(-100%) rotate(-540deg); opacity: 0; }
    to { transform: translateX(0) rotate(0); opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg) scale(0); opacity: 0; }
    to { transform: rotate(360deg) scale(1); opacity: 1; }
}

@keyframes spiral {
    from { transform: rotate(0deg) scale(0) translateX(200%); opacity: 0; }
    to { transform: rotate(1080deg) scale(1) translateX(0); opacity: 1; }
}

@keyframes elastic {
    0% { transform: scale(0); }
    55% { transform: scale(1.1); }
    70% { transform: scale(0.95); }
    85% { transform: scale(1.05); }
    100% { transform: scale(1); }
}